#include<graphics.h>
#include<conio.h>
#include<time.h>
#include<stdio.h>

#define  Width 640
#define Height 480

void main(){

	initgraph(Width,Height);
	srand((unsigned)time(NULL));
	int x[100],y[100];
	for(int i =0;i<100;i++){
		x[i] = rand()%640;
		y[i] = rand()%480;
	}
	BeginBatchDraw();
	while(1){
		for(int i=0;i<100;i++){
			putpixel(x[i],y[i],BLACK);
			y[i] =y[i]+3;
			if(y[i]>480){
				break;}	
			putpixel(x[i],y[i],WHITE);
			
			}
		FlushBatchDraw();
		Sleep(100);
	}
	EndBatchDraw();
	_getch();
	closegraph();
}